Using polynomial texture maps for micro-scale occlusions

ABSTRACT

Techniques for using a polynomial texture map (PTM) to encode micro-occlusions information. The micro-occlusions information stored in the PTM is then used to display micro-occlusions cast on a surface by surface geometries or other geometries under various irradiance conditions.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application claims priority from and is a continuationapplication of U.S. Non-Provisional Application No. 10/778,582 (AttorneyDocket No. 021751-005700US) filed on Feb. 12, 2004, the entire contentsof which are herein incorporated by reference for all purposes.

BACKGROUND OF THE INVENTION

The present invention relates to the field of computer graphics imaging,and more particularly to techniques for efficiently representingmicro-scale occlusions.

In computer graphics, the process of generating a 2-dimensional imagefrom a 3-dimensional scene comprising one or more objects from a givenviewpoint is referred to as rendering. Animated sequences can then becreated by rendering a sequence of images as the scene is graduallychanged over time. A great deal of time and effort is being devotedtowards improving the photo-realism of rendered images. This includesproviding graphic systems with the ability to render objects ofdifferent types, various textures, reflections, shadows, etc.

The depiction of shadows in rendered images goes a long way in enhancingthe realism of a 2-dimensional image. Shadows help to give a2-dimensional image the look and feel of 3-dimensions. Accordingly, animportant component of any graphics system is its ability to determineshadows cast by objects in a scene and to store the shadow informationsuch that it can be used for rendering the 2-dimensional image.

A shadow is cast by occlusion of light by an object or opaque surface.An object can cast a shadow on another object or onto itself(self-shadow). Accordingly, in order to determine shadow information fora scene, a graphics system determines occlusions that occur in thescene. An occlusion occurs when an opaque surface casts a shadow onanother surface from the perspective of the light source. For example,an object closer to the light source can cast a shadow on other objectsthat are further away from the light source in the scene. A surfacegeometry of one object may occlude another surface of the same object ora different object.

Various techniques are presently used for determining occlusioninformation. These include Z-buffering techniques, ray-tracing, andothers. Various techniques are also used for storing the shadowinformation. For example, in techniques using z-maps or shadow maps, ashadow map stores shadow depth values that are used by the graphicssystem to determine which portions of a surface are in shadow during therendering process. In techniques using ray tracing, a “light feeler” rayis sent out from a shaded point to determine if it hits something on itsway to the light source.

The existing techniques of determining occlusions and storing theocclusions information are however not suitable for occlusions thatoccur on a micro-scale, for example, occlusions that occur at a scale ofa few pixels (e.g., less than 3×3 pixels). Such micro-occlusions can becaused, for example, by a weave pattern on a cloth or fabric, by fibersof a material such as wool, velvet, etc., by fur particles, by grassblades, by hair strands, by “fuzzy” materials, knitwear material, andother structures that have fine divots and grooves that are too small tobe represented accurately by either a shadow map or a ray-tracingtechnique. In the past, such micro-scale occlusions were ignored bygraphics systems. Alternatively, extremely high resolution shadow mapswere used to represent the micro-scale occlusions. These high resolutionshadow maps however require extensive memory and processing resourcesfor storage and computations of the shadow maps. As a result, the use ofhigh resolution shadow maps for representing micro-occlusions is veryprone to aliasing artifacts, resource expensive, and often impracticalif feasible at all.

Improved techniques are thus needed for representing micro-occlusionsthat are more efficient than conventional techniques.

BRIEF SUMMARY OF THE INVENTION

Embodiments of the present invention provide techniques for using apolynomial texture map (PTM) to encode micro-occlusions information. Theocclusion PTM is then used during the rendering process to displaymicro-occlusions.

According to an embodiment of the present invention, techniques areprovided for storing a texture map encoding micro-occlusions informationfor a surface. A plurality of sets of values is determined for thesurface. Each set of values in the plurality including valuescorresponding to coefficients of a polynomial function that yields anocclusion value based upon a light direction. The plurality of sets ofvalues encodes information for micro-occlusions for the surface undervarying irradiance conditions. The plurality of sets of values is thenstored as a texture map.

According to an embodiment of the present invention, information isreceived identifying a light source direction. An occlusion value isdetermined for each set of values in the plurality of sets of values ofthe texture map, the occlusion value for each set of values determinedbased upon the values in the set of values and the light sourcedirection. An image is displayed based upon the determined occlusionvalues for the plurality of sets of values in the texture map.

The foregoing, together with other features, embodiments, and advantagesof the present invention, will become more apparent when referring tothe following specification, claims, and accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a simplified block diagram of a computer system capable ofimplementing an embodiment of the present invention;

FIG. 2 is a simplified high-level flowchart depicting a method ofdetermining, storing, and using an occlusion PTM for a textured surfaceaccording to an embodiment of the present invention;

FIG. 3 depicts a configuration that may be used to gather sampleocclusion images according to an embodiment of the present invention;

FIGS. 4A and 4B depict examples of occlusion sample images of a knitweartexture captured according to an embodiment of the present invention;

FIGS. 5A and 5B depict examples of texture images displayed using anocclusion PTM according to an embodiment of the present invention; and

FIG. 6 is simplified block diagram of modules that may be used toimplement an embodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

In the following description, for the purposes of explanation, specificdetails are set forth in order to provide a thorough understanding ofthe invention. However, it will be apparent that the invention may bepracticed without these specific details.

Embodiments of the present invention provide techniques for representingmicro-occlusions in an efficient manner. Micro-occlusions (ormicro-scale occlusions) are occlusions of light sources that are causedby geometries having a small scale and generally a high frequency.Examples include occlusions caused by small groves, weave patterns,fuzzy materials, etc. Due to the small scale and high frequencies of thegeometries, micro-occlusions caused by such geometries cannot be sampledefficiently using traditional shadowing techniques such as ray-tracing,z-maps, deep z-maps, etc. Each micro-occlusion is generally no more thanthe size of a few pixels (e.g., 5×5) once projected and rendered.

FIG. 1 is a simplified block diagram of a computer system 100 capable ofimplementing an embodiment of the present invention. As shown in FIG. 1,computer system 100 includes a processor 102 that communicates with anumber of peripheral devices via a bus subsystem 104. These peripheraldevices may include a storage subsystem 106, comprising a memorysubsystem 108 and a file storage subsystem 110, user interface inputdevices 112, user interface output devices 114, and a network interfacesubsystem 116. The input and output devices allow a user, such as theadministrator, to interact with computer system 100.

Network interface subsystem 116 provides an interface to other computersystems, and networks. Network interface subsystem 116 serves as aninterface for receiving data from other sources and for transmittingdata to other sources from computer system 100. Embodiments of networkinterface subsystem 116 include an Ethernet card, a modem (telephone,satellite, cable, ISDN, etc.), (asynchronous) digital subscriber line(DSL) units, and the like.

User interface input devices 112 may include a keyboard, pointingdevices such as a mouse, trackball, touchpad, or graphics tablet, ascanner, a barcode scanner, a touchscreen incorporated into the display,audio input devices such as voice recognition systems, microphones, andother types of input devices. In general, use of the term “input device”is intended to include all possible types of devices and mechanisms forinputting information to computer system 100.

User interface output devices 114 may include a display subsystem, aprinter, a fax machine, or non-visual displays such as audio outputdevices, etc. The display subsystem may be a cathode ray tube (CRT), aflat-panel device such as a liquid crystal display (LCD), or aprojection device. In general, use of the term “output device” isintended to include all possible types of devices and mechanisms foroutputting information from computer system 100.

Storage subsystem 106 may be configured to store the basic programmingand data constructs that provide the functionality of the presentinvention. For example, according to an embodiment of the presentinvention, software code modules implementing the functionality of thepresent invention may be stored in storage subsystem 106. These softwaremodules may be executed by processor(s) 102. Storage subsystem 106 mayalso provide a repository for storing data used in accordance with thepresent invention. For example, PTMs encoding the micro-occlusionsinformation may be stored in storage subsystem 106. Storage subsystem106 may comprise memory subsystem 108 and file/disk storage subsystem110.

Memory subsystem 108 may include a number of memories including a mainrandom access memory (RAM) 118 for storage of instructions and dataduring program execution and a read only memory (ROM) 120 in which fixedinstructions are stored. File storage subsystem 110 provides persistent(non-volatile) storage for program and data files, and may include ahard disk drive, a floppy disk drive along with associated removablemedia, a Compact Disk Read Only Memory (CD-ROM) drive, an optical drive,removable media cartridges, and other like storage media.

Bus subsystem 104 provides a mechanism for letting the variouscomponents and subsystems of computer system 100 communicate with eachother as intended. Although bus subsystem 104 is shown schematically asa single bus, alternative embodiments of the bus subsystem may utilizemultiple busses.

Computer system 100 can be of various types including a personalcomputer, a portable computer, a workstation, a network computer, amainframe, a kiosk, or any other data processing system. Due to theever-changing nature of computers and networks, the description ofcomputer system 100 depicted in FIG. 1 is intended only as a specificexample for purposes of illustrating the preferred embodiment of thecomputer system. Many other configurations having more or fewercomponents than the system depicted in FIG. 1 are possible.

Embodiments of the present invention provide techniques for encodingmicro-occlusions information. The techniques pre-generate themicro-occlusions information for a surface (e.g., a surface comprisingsmall scale geometries) and then use mathematical basis functions toencode and store the information in a compressed form. According to anembodiment of the present invention, polynomial texture maps (PTMs) areused to encode and store the micro-occlusions information. PTMs providean efficient technique for storing the micro-occlusions information in acompressed form that is manageable and does not require extensive memoryresources. Further, since PTMs can be evaluated using well-knownmathematical techniques, the complexity of processing required forrendering the micro-occlusions information is also reduced.

According to an embodiment of the present invention, a PTM is used toencode micro-occlusion information for an object or surface. Themicro-occlusions may be caused by the object itself (i.e., selfmicro-occlusion) or by another object. Such a PTM may also be referredto as an “occlusion PTM” or “micro-occlusion PTM” as it encodesmicro-occlusions information. The resolution of an occlusion PTM may bedetermined based upon the complexity of the surface to be modeled.According to an embodiment of the present invention, each PTM stores aset of coefficients or values for each pixel of the PTM that encodesmicro-occlusion information for the pixel. In this manner, the PTM withits sets of values encodes micro-occlusions information for a surfacecaused by irradiance sources (e.g., a single white irradiance source)incoming from any direction. During the rendering process, a graphicssystem is configured to evaluate the sets of coefficients of the PTM forthe various pixels to determine the shading to be applied to the pixelsbased upon local irradiance source color, direction, and intensityproperties. The result is a more realistic rendering of the surfaceincluding display of micro-occlusions cast onto the surface by thesurface geometries or by other geometries. The micro-occlusions aredynamically generated based upon different irradiance conditions. Theuse of PTMs for representing micro-occlusions uses less storage andcomputing resources than conventional techniques.

According to one embodiment, each set of coefficients stored in a PTMfor a pixel comprises coefficients of a bi-quadric polynomial of theform:A1u ² +A2u+A3uv+A4v+A5v ² +A 6=Kwhere

A1, A2, A3, A4, A5, and A6 are floating point coefficients of thepolynomial encoding micro-occlusions information for the pixel;

u and v are parameterized projections of the light source vectorprojected onto a plane perpendicular to the vertex normal of thesurface; and

K is an occlusion level value that is determined upon evaluating thepolynomial.

In the above embodiment, a PTM stores a set of coefficients (e.g., A1,A2, A3, A4, A5, A6) for each pixel of the PTM encoding micro-occlusionsinformation for a surface. A set of coefficients for a pixel thus storesa set of value to be used for evaluating the polynomial to determine theamount of occlusion for the pixel based on the light source vector.

At time of rendering, in order to determine if a particular pixel isoccluded or unoccluded, the polynomial function for a pixel is evaluatedusing the set of coefficients for the pixel and the light source vector(i.e., the direction of the light source), to determine an occlusionlevel value “K” for the pixel. In one embodiment, the occlusion levelvalue K for a pixel is bounded in [0-1] with 0 indicating no occlusionand 1 indicating full occlusion. Accordingly, if K is evaluated to be 0it indicates no occlusion for the pixel. If K is evaluated to be 1 itindicates full occlusion for the pixel. In this manner, at the time ofdisplaying the pixels, the sets of coefficients of a PTM are evaluatedto determine occlusion level values for the various pixels. Since a setof coefficients is stored for each pixel of the PTM, the PTM can storemicro-occlusions information at a per pixel scale. This enables the PTMto encode the fine details of micro-occlusions that could not beefficiently captured by conventional techniques.

The polynomial function described above is intended to be an example ofa polynomial that is used to encode micro-occlusions information. Itshould be apparent that various other forms of polynomials (e.g., ofdifferent order, different number of coefficients) may be used inalternative embodiments of the present invention. For example, apolynomial function of the form shown below may also be used.A1u ³ +A2v ³ +A3u ² v ² +A4u ² v+A5uv ² +A6u ² +A7v ² +A8uv+A9u+A10v+A11=Kwhere

A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, and A11 are floating pointcoefficients of the polynomial encoding micro-occlusions information forthe pixel;

u and v are parameterized projections of the light source vectorprojected onto a plane perpendicular to the vertex normal of thesurface; and

K is an occlusion level value that is determined by evaluating thepolynomial.

Additionally, other types of mathematical basis functions, besidespolynomials, may also be used to encode the micro-occlusionsinformation. These include radial basis functions, Greene's functions,etc.

FIG. 2 is a simplified high-level flowchart 200 depicting a method ofdetermining, storing, and using an occlusion PTM for a textured surfaceaccording to an embodiment of the present invention. The processingdepicted in each step of FIG. 2 may be performed by software modulesexecuted by a processor, hardware modules, or combinations thereof.Flowchart 200 depicted in FIG. 2 is merely illustrative of an embodimentof the present invention and is not intended to limit the scope of thepresent invention. Other variations, modifications, and alternatives arealso within the scope of the present invention. The method depicted inFIG. 2 may be adapted to work with different implementation constraints.

As depicted in FIG. 2, occlusion data samples are gathered for a surface(e.g., a textured surface) under varying irradiance (light) conditions(step 202). In one embodiment, as part of step 202, a swatch of thetextured surface is illuminated by light sources positioned at variousangles to the swatch and samples of the swatch are rendered from thesame viewpoint. Each rendered sample image stores micro-occlusionsinformation for the swatch texture for a given angle of the lightsource. Each sample image stores occlusion information indicating if apixel is either unoccluded (fully lit, white) or occluded (black).Different techniques such as high resolution deep shadow maps, raytracing, etc. may be used to generate the occlusion samples.

FIG. 3 depicts a configuration that may be used to gather occlusionsamples according to an embodiment of the present invention. As shown inFIG. 3, a texture swatch 302 is placed in the center. A render camera304 is positioned above texture swatch 302 and is used to capture imagesof texture swatch 302 under varying light conditions. The varying lightconditions are provided by illuminating the swatch using a light sourcefrom different angles. Dots 306 depicted in FIG. 3 form a uniform domeand represent the various locations where the light source is positionedto provide the varying light conditions. Each light source positionrepresents a different light source vector. According to an embodimentof the present invention, a light source is automatically positioned atthe each of the dot locations for capturing the samples. Camera 304 isconfigured to capture a sample image for each different light vector.Information regarding the position of the light (i.e., the light sourcevector) for each captured sample image is also stored. In oneembodiment, commercially available software such as Maya may be used tocapture the occlusion image samples.

The configuration depicted in FIG. 3 may be controlled by the user forany particular application. For example, the user may specify the radiusof the hemisphere for the various light locations. The “dots” may bedistributed on the hemisphere in a regular or non-regular manner.Generally, a regular even distribution of “dots” is used. The number oflight source locations and the number of samples to be taken may beuser-defined. The position of the render camera that is used to capturethe images may also be set by the user. The parametric projections ofthe light vector on the plane of the swatch represent the “u” and “v”parameters of the polynomial. The size of the swatch may be controlledby the user. Swatches of different textures and materials may be used.

FIGS. 4A and 4B depict examples of occlusion sample images of a knitweartexture where micro occlusions between fibers were recorded (1024×1024resolution) according to an embodiment of the present invention. Asshown, the images store the light micro-occlusion information(white—unoccluded, fully lit; black—occluded, fully self-occluded) thatis then used to generate the sets of coefficients for the occlusion PTM.High resolution (4096×4096) deep shadow maps were used to generate theocclusion samples depicted in FIGS. 4A and 4B. The occlusion images inFIGS. 4A and 4B were captured using increasingly shallow light sourceangles.

Referring back to FIG. 2, the micro-occlusion data sample imagesgathered in step 202 are then processed to determine a set ofcoefficients for each pixel of the textured surface (step 204). Thenumber of coefficients in each set depends on the polynomial chosen forencoding the micro-occlusions information. For example, each set maycomprise six coefficients (A1, A2, A3, A4, A5, A6) for a bi-quadraticpolynomial. The set of coefficients for each pixel form the PTMrepresenting micro-occlusion information for the swatch. The occlusionPTM thus represents a pre-computed approximation of the per-pixelocclusion under varying light conditions. A PTM, using different formsof polynomials, can also encode illumination functions that can includethe results in parts of complex shading and illumination calculationsincluding high frequency self-occlusion or subsurface scattering. Asdescribed above, in one embodiment, the function is approximated by aset of six coefficients for each pixel of the texture, which are storedin channels of a texture map.

Various different techniques may be used to determine the coefficientsfor each pixel. According to an embodiment of the present invention, thesamples gathered in step 202 along with information identifying theincident light angles (light vectors, irradiance conditions) thatgenerated the samples are subjected to a mathematical fitting processthat derives a set of six coefficients (A1, A2, A3, A4, A5, A6) for eachpixel of the textured surface using a least squares fit to a chosenpolynomial (can be bi-quadratic, cubic, etc.). Other mathematicaltechniques known to those skilled in the art may also be used to derivethe sets of coefficients in the PTM. Each set of coefficients encodes apolynomial function that tries to dynamically reconstruct the original(light dependent) micro-occlusion function. In a similar manner, sets ofsix coefficients are derived for the pixels and stored as an occlusionPTM.

Various different techniques may be used for storing the information.According to an embodiment of the present invention, the resulting PTMis stored as a single image (1 image of 6 channels). Other types imagesmay be used to such as in a floating point set of 2 tiff images (2images of 3 channels) (each coefficient of the polynomial is referred toas a “channel”).

The occlusion PTM generated in step 204 represents and encodes themicro-occlusions information and can be used during the renderingprocess to display the micro-occlusions. PTM encoding of pre-calculatedmicro-occlusion information, as provided by embodiments of the presentinvention, requires less storage space than that what would be requiredto capture such information using high resolution traditional shadow (ordeep-shadow) maps The use of PTMs also requires orders of magnitude lessmemory and processing resources than what would be needed fortraditional ray-tracing based techniques.

During the rendering process, a graphics system (e.g., a shader) isconfigured to render and display an image using the PTM generated instep 204 (step 206). According to an embodiment of the presentinvention, in order to determine if a particular pixel is occluded orunoccluded, a polynomial is evaluated using coefficients in the set ofcoefficients corresponding to the pixel in the PTM and using the givenlight vector (i.e., direction of the light source) to determine a valuefor K (the occlusion level value). The evaluated value of K thendetermines if the pixel is occluded or not. In one embodiment, if K isevaluated to be 0 it indicates no occlusion for the pixel. If K isevaluated to be 1 it indicates full occlusion for the pixel. In thismanner, in step 206, the sets of coefficients of a PTM are evaluated todetermine occlusion level values for the various pixels. The image isthen rendered and displayed based upon the determined occlusion levelvalues.

Since evaluation of the polynomial for each pixel involves a limitednumber of multiplications and additions, the occlusion PTM can beevaluated in an efficient manner using less processing resources thanconventional techniques used for representing micro-occlusions.

In one embodiment, the occlusion PTM information is read by a surfaceshader. The surface shader reads the polynomial coefficients from theocclusion PTM for each pixel and communicates the coefficients to alight shader. The light shader may also receive various other inputssuch as other texture maps information, macro-scale occlusions, bendingeffects information, buckling effects information, fog effects, etc. inaddition to the occlusion PTM information. Based upon the variousinputs, the light shader determines and outputs a light intensity valuefor each pixel which represents the illumination model for the pixel.The illumination model for the pixel represents the compounded effect ofthe different inputs to the light shader including micro-scaleocclusions using occlusion PTMs. The illumination model for each pixelis then used to display the pixel. In this manner, an image is displayedthat displays micro-scale occlusions.

FIG. 5A depicts an example of a complex weave texture image displayedusing an occlusion PTM according to an embodiment of the presentinvention. In the embodiment depicted in FIG. 5B, the light source ispositioned at approximately a 45 degree angle above the object from thebottom side of the image. FIG. 5B depicts an example of another imagedisplayed using an occlusion PTM according to an embodiment of thepresent invention. Arrow 502 in FIG. 5B represents the direction of theincident light. As the direction of the light source changes, theshadows and occlusions also rotate dynamically in response to the lightsource position. The use of occlusion PTMs thus allows for enhancedlight interaction and dynamic generation of micro-occlusions.

FIG. 6 is simplified block diagram of modules that may be used toimplement an embodiment of the present invention. The modules depictedin FIG. 6 may be software modules, hardware modules, or combinationsthereof. These modules include a sample generator module 602, a fittermodule 604, a surface shader module 606, and a light shader module 608.Many other configurations having more or fewer modules than the onesdepicted in FIG. 1 are possible in alternative embodiments of thepresent invention.

Sample generator module 602 is configured to generate occlusion samplesfor a surface under varying irradiance (light) conditions. As previouslydescribed, different configurations and set ups may be used to generatethe samples. The samples generated by sample generator module 602 arethen passed to a fitter module 604 that is configured to performmathematical processing on the samples and generate an occlusion PTMthat encodes micro-scale occlusions information. Fitter 604 may usedifferent mathematical fitting processes to generate occlusion PTM 612.

Occlusion PTM 612 may then be used by a renderer 610 to display animage. In one embodiment, as depicted in FIG. 6, the occlusion PTMcoefficients are read by surface shader module 606 that communicates thecoefficients to a light shader module 608. Light shader 608 may alsoreceive various other inputs 614 such as texture maps, bending effectsinformation, buckling effects information, fog effects, etc. in additionto the occlusion PTM information. Based upon the various inputs, lightshader 608 is configured to determine and output a light intensity valuefor each pixel that represents the illumination model for the pixel. Theillumination model for the pixel represents the compounded effect of thedifferent inputs to the light shader including micro-scale occlusionsusing occlusion PTMs. The illumination model for each pixel is thenpassed back to surface shader 606 and is used to display the pixel. Inthis manner, an image 616 that include micro-scale occlusions isdisplayed.

PTMs are presently used in the computer graphics imaging field forstoring Bidirectional Reflection Distribution Function (BRDF)information, for example, for storing surface color information for anobject under varying light conditions. In such implementations, each PTMstores sets of coefficients that encode color information. The BRDFinformation is then retrieved by graphics hardware. However, PTMs havenot been used to store exclusively micro-occlusions information. Asdescribed above, according to the teachings of the present invention,instead of storing BRDF information, PTMs are used to encode and storeonly micro-occlusions information. A PTM thus provides an efficient andcompressed technique for storing micro-occlusions information. Themicro-occlusions information stored by an occlusion PTM can then be usedefficiently to dynamically render and display materials more accurately.

Since the PTM stores only micro-occlusions information, therepresentation of the micro-occlusion information is independent of therepresentations of the illumination model. The micro-occlusionsinformation encoded in an occlusion PTM may be in conjunction with anyillumination models when an image is displayed. As a result of theindependence from illumination models, a micro-occlusions informationPTM can be used with various different illumination models, withdiffering complexities based upon the application, to display the image.A graphics system is thus free to choose the illumination model and thenuse occlusion PTMs in conjunction with the selected illumination model.Illumination models may thus be complemented with previously unavailablemicro-scale occlusions information encoded by the occlusion PTMs.

According to an embodiment of the present invention, themicro-occlusions information encoded by an occlusion PTM may also beused to render repeatable or tileable patterns. If a surface texturepattern is tileable, then the occlusion samples generated for thepattern take into account bordering iterations of the pattern. In thisembodiment, when the occlusion samples are rendered, a section of tiles(e.g., 9 tiles of 3×3) of the pattern are represented. The renderingcamera only renders the central pattern and the surrounding occlusionpatterns are generated based upon the central pattern such that theborders between the tiles is seamless. A PTM generated from such samplesalso encodes the information and is thus tileable. The PTM encodes thetileable occlusion nature of the texture and the micro-occlusionsinformation encoded by the PTM is tileable. Using occlusion PTMs may beused for rendering various patterns and is particular useful whenapplied to cloth weave patterns.

Although specific embodiments of the invention have been described,various modifications, alterations, alternative constructions, andequivalents are also encompassed within the scope of the invention. Thedescribed invention is not restricted to operation within certainspecific data processing environments, but is free to operate within aplurality of data processing environments. Additionally, although thepresent invention has been described using a particular series oftransactions and steps, it should be apparent to those skilled in theart that the scope of the present invention is not limited to thedescribed series of transactions and steps.

Further, while the present invention has been described using aparticular combination of hardware and software, it should be recognizedthat other combinations of hardware and software are also within thescope of the present invention. The present invention may be implementedonly in hardware, or only in software, or using combinations thereof.For example, the processing performed by the present invention, asdescribed above, may be implemented in hardware chips, graphics boardsor accelerators, etc.

The specification and drawings are, accordingly, to be regarded in anillustrative rather than a restrictive sense. It will, however, beevident that additions, subtractions, deletions, and other modificationsand changes may be made thereunto without departing from the broaderspirit and scope of the invention as set forth in the claims.

1. A method of storing a texture map encoding micro-occlusionsinformation for a surface, the method comprising: determining aplurality of sets of values, each set of values in the pluralityincluding values corresponding to coefficients of a polynomial functionthat yields an occlusion value based upon a light direction, theplurality of sets of values encoding information for micro-occlusionsfor the surface under varying irradiance conditions; and storing theplurality of sets of values as a texture map.
 2. The method of claim 1further comprising: obtaining a plurality of samples of the surfaceusing a plurality of irradiant conditions, each sample depictingmicro-occlusion information for the surface for a particular irradiantcondition from the plurality of irradiant conditions; and whereindetermining the plurality of sets of values comprises determining theplurality of sets of values based upon the plurality of samples obtainedfor the surface.
 3. The method of claim 2 wherein determining theplurality of sets of values based upon the plurality of samplescomprises using a mathematical fitting process to determine the valuesfor the plurality of sets of values.
 4. The method of claim 1 furthercomprising: displaying a rendered image of the surface using the texturemap, the rendered image displaying one or more micro-occlusions.
 5. Themethod of claim 1 further comprising: receiving information identifyinga light source direction; determining an occlusion value for each set ofvalues in the plurality of sets of values of the texture map, theocclusion value for each set of values determined based upon the valuesin the set of values and the light source direction; and displaying animage based upon the determined occlusion values for the plurality ofsets of values in the texture map.
 6. The method of claim 5 whereindetermining the occlusion value for each set of values in the pluralityof set of values of the texture map comprises evaluating the polynomialfunction using the values in the set of values and the light sourcedirection.
 7. The method of claim 1 wherein the polynomial function isA1u2+A2u+A3uv+A4v+A5v ² +A6 where A1, A2, A3, A4, A5, and A6 arecoefficients of the polynomial function encoding micro-occlusioninformation, and u and v are parameterized projections of a light sourcevector.
 8. The method of claim 7 wherein determining the occlusion valuefor each set of values in the plurality of set of values of the texturemap comprises evaluating the polynomial function using the values in theset of values and the light source direction.
 9. The method of claim 1wherein the polynomial function isA1u ³ +A2v ³ +A3u ² v ² +A4u ² v+A5uv ² +A6u ² +A7v ² +A8uv+A9u+A10v+A11where A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, and A11 are coefficientsof the polynomial function encoding micro-occlusion information, and uand v are parameterized projections of a light source vector.
 10. Acomputer program product stored on a computer-readable medium forstoring a texture map encoding micro-occlusions information for asurface, the computer program product comprising: code for determining aplurality of sets of values, each set of values in the pluralityincluding values corresponding to coefficients of a polynomial functionthat yields an occlusion value based upon a light direction, theplurality of sets of values encoding information for micro-occlusionsfor the surface under varying irradiance conditions; and code forstoring the plurality of sets of values as a texture map.
 11. Thecomputer program product of claim 10 further comprising: code forobtaining a plurality of samples of the surface using a plurality ofirradiant conditions, each sample depicting micro-occlusion informationfor the surface for a particular irradiant condition from the pluralityof irradiant conditions; and wherein the code for determining theplurality of sets of values comprises code for determining the pluralityof sets of values based upon the plurality of samples obtained for thesurface.
 12. The computer program product of claim 11 wherein the codefor determining the plurality of sets of values based upon the pluralityof samples comprises code for using a mathematical fitting process todetermine the values for the plurality of sets of values.
 13. Thecomputer program product of claim 10 further comprising: code fordisplaying a rendered image of the surface using the texture map, therendered image displaying one or more micro-occlusions.
 14. The computerprogram product of claim 10 further comprising: code for receivinginformation identifying a light source direction; code for determiningan occlusion value for each set of values in the plurality of sets ofvalues of the texture map, the occlusion value for each set of valuesdetermined based upon the values in the set of values and the lightsource direction; and code for displaying an image based upon thedetermined occlusion values for the plurality of sets of values in thetexture map.
 15. The computer program product of claim 14 wherein thecode for determining the occlusion value for each set of values in theplurality of set of values of the texture map comprises code forevaluating the polynomial function using the values in the set of valuesand the light source direction.
 16. The computer program product ofclaim 10 wherein the polynomial function isA1u ² +A2u+A3uv+A4v+A5v ² +A6 where A1, A2, A3, A4, A5, and A6 arecoefficients of the polynomial function encoding micro-occlusioninformation, and u and v are parameterized projections of a light sourcevector.
 17. The computer program product of claim 16 wherein the codefor determining the occlusion value for each set of values in theplurality of set of values of the texture map comprises code forevaluating the polynomial function using the values in the set of valuesand the light source direction.
 18. The computer program product ofclaim 10 wherein the polynomial function isA1u ³ +A2v ³ +A3u ² v ² +A4u ² v+A5uv ² +A6u ² +A7v ² +A8uv+A9u+A10v+A11where A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, and A11 are coefficientsof the polynomial function encoding micro-occlusion information, and uand v are parameterized projections of a light source vector.
 19. Acomputer system for storing a texture map encoding micro-occlusionsinformation for a surface, the system comprising: a processor; and amemory coupled to the processor, the memory configured to store aplurality-of instructions executable by the processor, the plurality ofinstructions comprising: instructions for determining a plurality ofsets of values, each set of values in the plurality including valuescorresponding to coefficients of a polynomial function that yields anocclusion value based upon a light direction, the plurality of sets ofvalues encoding information for micro-occlusions for the surface undervarying irradiance conditions; and instructions for storing theplurality of sets of values as a texture map.
 20. The system of claim 19wherein the plurality of instructions further comprises: instructionsfor obtaining a plurality of samples of the surface using a plurality ofirradiant conditions, each sample depicting micro-occlusion informationfor the surface for a particular irradiant condition from the pluralityof irradiant conditions; and wherein the instructions for determiningthe plurality of sets of values comprise instructions for determiningthe plurality of sets of values based upon the plurality of samplesobtained for the surface.